﻿<s:SurfaceWindow
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008"
    xmlns:dz="clr-namespace:DeepZoom.Controls;assembly=DeepZoom"
    xmlns:ae="clr-namespace:LADSArtworkMode"
    xmlns:local="Local"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
    mc:Ignorable="d" x:Class="LADSArtworkMode.ArtworkModeWindow"
    Title="LADS - Artwork Mode"
    WindowStyle="None" ResizeMode="CanResize"
    WindowState="Maximized"
    Width="1920"
    Height="1080" Loaded="SurfaceWindow_Loaded">

    <s:SurfaceWindow.Resources>
        <!--<m:HotspotModel x:Key="HotspotBindingData"/>-->
        <Style TargetType="{x:Type s:ScatterViewItem}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type s:ScatterViewItem}">
                        <ContentPresenter />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </s:SurfaceWindow.Resources>



    <Canvas Name="Main" Loaded="Main_Loaded">
        <Label Name="SectionTitlesMaster" Visibility="Collapsed" FontSize="24"/>
        <Label Name="ToolLabelMaster" Visibility="Collapsed" FontSize="12"/>
        <StackPanel Name="SectionBoxMaster" Visibility="Collapsed" Height="214" Width="345"/>
        <s:SurfaceButton Name="LeftPanelButtonMaster" Visibility="Collapsed" FontSize="15" Width="5"/>
        <s:SurfaceListBox Name="SectionListBoxMaster" Visibility="Collapsed" Height="135"/>

        <Canvas Name="ImageArea" Background="#ccd6c1" Height="1080" Width="1920" Canvas.ZIndex ="-1">

            <Grid Name="DeepZoomGrid" Height="1080" Width="1920" Canvas.Top="0" Canvas.Left="0">
                <dz:MultiScaleImage Name="msi">
                    <dz:MultiScaleImage.Effect>
                        <ae:ImageShaderEffects
                        Brightness="{Binding ElementName=sliderBrightness, Path=Value}"
                        Contrast="{Binding ElementName=sliderContrast, Path=Value}"
                        Saturation="{Binding ElementName=sliderSaturation, Path=Value}"/>
                    </dz:MultiScaleImage.Effect>
                </dz:MultiScaleImage>
                <dz:MultiScaleImage Name="msi_tour" Visibility="Hidden" />
                <dz:MultiScaleImage Name="msi_tour_overlay" Visibility="Hidden" />
                <Image Name="mainImage" TouchDown="mainImage_TouchDown" MouseLeftButtonDown="mainImage_MouseLeftButtonDown" />
                <Canvas Name="HotspotOverlay">
                    <Canvas.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform x:Name="HotspotOverlay_Scale" />
                            <TranslateTransform x:Name="HotspotOverlay_Translate" />
                        </TransformGroup>
                    </Canvas.RenderTransform>
                </Canvas>

                <s:ScatterView Name="MSIScatterView" Width="1920" Height="1080"></s:ScatterView>
            </Grid>
        </Canvas>



        <DockPanel Name="BottomPanel" Opacity=".9" Canvas.Top="864" Background="#eceff0" Height="216" Width="1920" Canvas.ZIndex ="100">
            <Grid Name="NavPanel" Background="#bdd0bd" DockPanel.Dock="Left" Width="384" Height="216">
                <!-- zoom navigator -->
                <Grid Margin="20, 20, 20, 20" Background="Black" ClipToBounds="True">
                    <dz:MultiScaleImage Name="msi_thumb" />
                    <!-- artwork thumbnail MSI -->
                    <dz:MultiScaleImage Name="msi_tour_thumb" Visibility="Hidden"/>
                    <!-- tour thumbnail MSI-->

                    <Rectangle Name="msi_thumb_rect"  Fill="Red" Opacity="0.5" ManipulationDelta="msi_thumb_rect_ManipulationDelta" Loaded="msi_thumb_rect_Loaded"/>
                    
                    <!-- zoom navigation indicator -->
                </Grid>
            </Grid>
            <DockPanel DockPanel.Dock="Right">
                
                <Canvas Name="tourSeekBar" Width="1536" HorizontalAlignment="Stretch" DockPanel.Dock="Top" Visibility="Hidden">
                    <!-- tour seek bar -->
                    <s:SurfaceButton Name="tourControlButton" Content="Play/Pause" Height="30" Width="110" MinHeight="0" Padding="7 1 7 0" Canvas.Left="-200" Visibility="Collapsed" Canvas.Top="-30" HorizontalContentAlignment="Center" />
                    <s:SurfaceButton Name="tourStopButton" Content="Stop" Height="30" Width="80" MinHeight="0" Padding="7 1 7 0" Canvas.Left="-90" Visibility="Collapsed" Canvas.Top="-30" HorizontalContentAlignment="Center" />
                    <Rectangle Name="tourSeekBarSlider" Width ="1404" Height="30" Canvas.Top="-30" Fill="Gray" Opacity="0.5"></Rectangle>
                    <Canvas Name ="tourSeekBarTimeDisplayBackground" Width="132" Height="30" Canvas.Top="-30" Canvas.Right="0" Background="Black">
                        <Label Name="tourSeekBarTimerCount" Canvas.Left="3" Foreground="Yellow" Content="00:00"></Label>
                        <Label Name="tourSeekBarLength" Canvas.Left="45" Foreground="White" Content="/ 00:00"></Label>
                    </Canvas>
                    <Rectangle Name="tourSeekBarProgress" Width="0" Height="30" Canvas.Top="-30" Fill="Yellow" Opacity="0.5"></Rectangle>
                    <!-- tour seek bar progress indicator -->
                    <Rectangle Name="tourSeekBarMarker" Width="40" Height="25" Canvas.Top="-27" Fill="Yellow"></Rectangle>
                    <!-- this could perhaps be changed to widen to 40 px only when initially touched, similar to how Surface sliders and scroll bars behave -->
                </Canvas>
                
                <Canvas Width="1536" MinHeight="5" HorizontalAlignment="Stretch" DockPanel.Dock="Bottom">

                </Canvas>
                <Canvas x:Name="textBar" DockPanel.Dock="Top" Background="#4e765c" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="30" MouseDown="BottomButtonClick">
                    <TextBlock Name="textMessage" Foreground="White" Text="Bar cannot be docked during a tour" Opacity="0" FontSize="16" Canvas.Top="2"/>
                    <TextBlock Name="verticalMessage" Foreground="White" Text="Toolbar cannot be opened during a tour" Opacity="0" FontSize="16" Canvas.Top="2"/>
                </Canvas>
                <s:SurfaceListBoxItem Name="Text" Background="Transparent" Width="300" Height="100" HorizontalAlignment="Center" VerticalAlignment="Top" Content="Bar cannot be docked during a tour" Opacity="0" Foreground="Black" Visibility="Collapsed"/>
                <s:SurfaceListBox Name="Bar" DockPanel.Dock="Bottom" ScrollViewer.ScrollChanged="BottomBarScroll" ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Visible">
                    <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <StackPanel Orientation="Horizontal" />
                        </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                </s:SurfaceListBox>
            </DockPanel>
        </DockPanel>

        <Canvas Name="tourAuthoringUICanvas" Width="1920" Height="216" Canvas.Top="864" ClipToBounds="True" Canvas.ZIndex ="100"></Canvas>
        <!-- tour authoring UI canvas -->

        <DockPanel Name="LeftPanel" Opacity=".9" Canvas.Top="0" Canvas.Left="0" Height="864" Width="384" Background="#618276" Canvas.ZIndex="99">

            <s:SurfaceButton VerticalAlignment="Stretch" HorizontalAlignment="Right" Width="30" Background="#5a675f" Click="LeftButtonClick" DockPanel.Dock="Right">
            </s:SurfaceButton>

            <StackPanel Name="leftPaneContent" Background="#618276" DockPanel.Dock="Right">
                <Canvas Name="Tools" 
                        Height="{Binding Height, ElementName=SectionBoxMaster}"
                        MinHeight="{Binding Height, ElementName=SectionBoxMaster}"
                        MaxHeight="{Binding Height, ElementName=SectionBoxMaster}"
                        Width="{Binding Width, ElementName=SectionBoxMaster}" 
                        Background="#618276">

                    <Label Content="Tools"
                           FontSize="{Binding FontSize, ElementName=SectionTitlesMaster}"
                           Name="labelTools" 
                           FontFamily="Segoe360" FontWeight="Bold"/>
                    <Label 
                        Canvas.Top="43"
                        Content="Brightness" FontSize="{Binding FontSize, ElementName=ToolLabelMaster}"
                        Name="labelBrightness"/>
                    <s:SurfaceSlider  
                                      Minimum="-100" Maximum="100"
                                      Canvas.Top="63" 
                                      Name="sliderBrightness" 
                                      Width="290"
                                      IsSnapToTickEnabled="True" 
                                      Value="0" />
                    <TextBlock 
                               Name="textBlockBrightness"
                               Canvas.Top="63" Canvas.Right="15" 
                               Width ="40" Height="23" 
                               Foreground="White" FontWeight="Bold" FontSize="18" 
                               Text="{Binding ElementName=sliderBrightness, Path=Value}" 
                               TextAlignment="Center"/>
                    <Label Content="Contrast" 
                           FontSize="{Binding FontSize, ElementName=ToolLabelMaster}" Canvas.Top="85" 
                           Name="labelContrast"/>
                    <s:SurfaceSlider Height="23" 
                                     Minimum="-100" Maximum="100" Canvas.Top="106"
                                     Name="sliderContrast" 
                                     Width="290" 
                                     IsSnapToTickEnabled="True" 
                                     Value="0"  
                                     />
                    <TextBlock
                        Name="textBlockContrast"
                        Canvas.Top="106" Canvas.Right="15" 
                        Width ="40" Height="23" 
                        Foreground="White" FontWeight="Bold" FontSize="18" 
                        Text="{Binding ElementName=sliderContrast, Path=Value}" 
                        TextAlignment="Center"></TextBlock>

                    <Label 
                        Content="Saturation" 
                        FontSize="{Binding FontSize, ElementName=ToolLabelMaster}"
                        Canvas.Top="129" 
                        Name="labelSaturation"/>
                    <s:SurfaceSlider Height="23" 
                                     Minimum="-100" Maximum="100" Canvas.Top="148" 
                                     Name="sliderSaturation" 
                                     Width="290" 
                                     IsSnapToTickEnabled="True" 
                                     Value="0"  
                                     />
                    <TextBlock Name="textBlockSaturation"
                                Canvas.Top="148" Canvas.Right="15" 
                               Width ="40" Height="23" Foreground="White" 
                               FontWeight="Bold" FontSize="18"
                               Text="{Binding ElementName=sliderSaturation, Path=Value}" 
                               TextAlignment="Center"></TextBlock>

                    <s:SurfaceButton Content="Reset All"
                                     Height="{Binding Height, ElementName=LeftPanelButtonMaster}"
                                     MinHeight="{Binding Height, ElementName=LeftPanelButtonMaster}"
                                     MaxHeight="{Binding Height, ElementName=LeftPanelButtonMaster}"
                                     Name="sBResetAll" 
                                     Click="sBResetAll_Click" 
                                     Canvas.Right="{Binding Width, ElementName=LeftPanelButtonMaster}" Canvas.Top="5"
                                     FontSize="{Binding FontSize, ElementName=LeftPanelButtonMaster}"
                                     MinWidth="0"
                                     Padding="7 2 7 0"/>
                </Canvas>
                <Canvas Height="1" Background="Black" Width="{Binding Width, ElementName=SectionBoxMaster}"/>
                <Canvas Height="2" Background="#5a675f" Width="{Binding Width, ElementName=SectionBoxMaster}"/>
                <Canvas Height="1" Background="Black" Width="{Binding Width, ElementName=SectionBoxMaster}"/>
                <Canvas Name="HotspotNav" 
                        Height="{Binding Height, ElementName=SectionBoxMaster}"
                        MinHeight="{Binding Height, ElementName=SectionBoxMaster}"
                        MaxHeight="{Binding Height, ElementName=SectionBoxMaster}"
                        Width="{Binding Width, ElementName=SectionBoxMaster}">

                    <Label Content="Hotspots" 
                           FontFamily="Segoe360" FontSize="{Binding FontSize, ElementName=SectionTitlesMaster}" 
                           FontWeight="Bold" Name="labelHotspotNav"/>

                    <s:SurfaceButton Name="toggleHotspots" 
                                     Content="Hotspots On"
                                     
                                     Height="{Binding Height, ElementName=LeftPanelButtonMaster}"
                                     MinHeight="{Binding Height, ElementName=LeftPanelButtonMaster}"
                                     MaxHeight="{Binding Height, ElementName=LeftPanelButtonMaster}"
                                         
                                     Canvas.Right="{Binding Width, ElementName=LeftPanelButtonMaster}" Canvas.Top="5" 
                                     Click="toggleHotspots_Click" 
                                     FontSize="{Binding FontSize, ElementName=LeftPanelButtonMaster}"
                                     MinWidth="0"
                                     Padding="7 2 7 0"/>
                    <s:SurfaceTextBox Name="sTextBoxHotSpotSearch"  
                                      Canvas.Top="40" 
                                      Canvas.Left="5" 
                                      Height="30" 
                                      Width="260" 
                                      MinWidth="0" MinHeight="0" 
                                      TextChanged="sTextBoxHotSpotSearch_TextChanged"
                                      PreviewMouseDown="sTextBoxHotSpotSearch_Click"
                                      PreviewTouchDown="sTextBoxHotSpotSearch_Click"
                                      Foreground="Gray"
                                      Text="Type here to search..."
                                      FontSize="{Binding FontSize, ElementName=LeftPanelButtonMaster}" />


                    <s:SurfaceButton Content="Clear" 
                                     Height="{Binding Height, ElementName=LeftPanelButtonMaster}"
                                     MinHeight="{Binding Height, ElementName=LeftPanelButtonMaster}"
                                     MaxHeight="{Binding Height, ElementName=LeftPanelButtonMaster}"
                                     FontSize="{Binding FontSize, ElementName=LeftPanelButtonMaster}"
                                     Name="sBHotSpotClear" Canvas.Right="{Binding Width, ElementName=LeftPanelButtonMaster}" Canvas.Top="40"
                                     MinWidth="0"
                                     Padding="7 2 7 0"
                                     Click="sBHotSpotClear_Click"
                                      />


                    <s:SurfaceListBox Height="{Binding Height, ElementName=SectionListBoxMaster}" 
                                      Width="{Binding Width, ElementName=SectionListBoxMaster}" MinHeight="0"
                                      Canvas.Top="80"
                                      
                                      Name="listHotspotNav" 
                                      VerticalAlignment="Top"  
                                      SelectionChanged="listHotspotNav_SelectionChanged"
                                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"/>
                </Canvas>
                <Canvas Height="1" Background="Black" Width="{Binding Width, ElementName=SectionBoxMaster}"/>
                <Canvas Height="2" Background="#5a675f" Width="{Binding Width, ElementName=SectionBoxMaster}"/>
                <Canvas Height="1" Background="Black" Width="{Binding Width, ElementName=SectionBoxMaster}"/>
                <Canvas Name="AssociatedDocs"
                        Height="{Binding Height, ElementName=SectionBoxMaster}"
                        MinHeight="{Binding Height, ElementName=SectionBoxMaster}"
                        MaxHeight="{Binding Height, ElementName=SectionBoxMaster}" 
                        Width="{Binding Width, ElementName=SectionBoxMaster}">
                    <Label Content="Associated Media" FontFamily="Segoe360" 
                           FontSize="{Binding FontSize, ElementName=SectionTitlesMaster}" FontWeight="Bold" Height="40" 
                           HorizontalAlignment="Left" Name="labelDocs" VerticalAlignment="Top" Width="240" />

                    <s:SurfaceTextBox Name="sTextBoxDocsSearch"  Canvas.Top="40" Canvas.Left="5" Height="30" MinHeight="0" Width="260" FontSize="14" Foreground="Gray" PreviewMouseDown="sTextBoxDocsSearch_Click" PreviewTouchDown="sTextBoxDocsSearch_Click" Text="Type here to search..."  TextChanged="sTextBoxDocsSearch_TextChanged"/>
                    <s:SurfaceButton Name="sBDocsSearchClear" Content="Clear"
                                     FontSize="{Binding FontSize, ElementName=LeftPanelButtonMaster}"
                                     Height="{Binding Height, ElementName=LeftPanelButtonMaster}"
                                     MinHeight="{Binding Height, ElementName=LeftPanelButtonMaster}"
                                     MaxHeight="{Binding Height, ElementName=LeftPanelButtonMaster}"
                                     Padding="7 2 7 0" Canvas.Right="{Binding Width, ElementName=LeftPanelButtonMaster}"
                                     Canvas.Top="40" Click="sBDocsSearchClear_Click" MinWidth="0" />


                    <s:SurfaceListBox Name="treeDocs" 
                                      Grid.Row="2"
                                      Canvas.Top="80"
                                      Height="{Binding Height, ElementName=SectionListBoxMaster}"
                                      Width="{Binding Width, ElementName=SectionListBoxMaster}" 
                                      VerticalAlignment="Stretch" 
                                      MinHeight="0"
                                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                                      />
                </Canvas>
                <Canvas Height="1" Background="Black" Width="{Binding Width, ElementName=SectionBoxMaster}"/>
                <Canvas Height="2" Background="#5a675f" Width="{Binding Width, ElementName=SectionBoxMaster}"/>
                <Canvas Height="1" Background="Black" Width="{Binding Width, ElementName=SectionBoxMaster}"/>
                <Canvas Name="Tours"
                        Height="{Binding Height, ElementName=SectionBoxMaster}"
                        MinHeight="{Binding Height, ElementName=SectionBoxMaster}"
                        MaxHeight="{Binding Height, ElementName=SectionBoxMaster}"
                        Width="{Binding Width, ElementName=SectionBoxMaster}"
                        Background="#ee618276">
                    <Label Grid.Row="3" Content="Tours" FontFamily="Segoe360" FontSize="{Binding FontSize, ElementName=SectionTitlesMaster}" FontWeight="Bold" Height="40" HorizontalAlignment="Left" Margin="2,1,0,0" Name="labelTours" VerticalAlignment="Top" Width="380" />

                    <s:SurfaceListBox Name="TourScroll" VerticalAlignment="Stretch"  HorizontalAlignment="Stretch" 
                              Width="{Binding Width, ElementName=SectionListBoxMaster}" 
                               
                              ScrollViewer.ScrollChanged="BottomBarScroll"
                              ScrollViewer.VerticalScrollBarVisibility="Hidden"
                              ScrollViewer.HorizontalScrollBarVisibility="Visible">
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Horizontal" />
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                    </s:SurfaceListBox>



                    <!-- <s:SurfaceButton Content="PanMSI" Height="30" HorizontalAlignment="Left" Margin="10,40,0,0" Name="PanMSIButton" VerticalAlignment="Top" Width="115" Grid.Row="2" Click="PanMSIButton_Click" MinWidth="0" MinHeight="0" Padding="11,2,0,0" />
                    <s:SurfaceButton Content="ZoomMSIArt" Height="30" HorizontalAlignment="Left" Margin="130,40,0,0" Name="ZoomMSIArtButton" VerticalAlignment="Top" Width="115" Grid.Row="2" Click="ZoomMSIButton_Click" MinWidth="0" MinHeight="0" Padding="11,2,0,0" />
                    <s:SurfaceButton Content="OpenMedia" Height="30" HorizontalAlignment="Left" Margin="10,75,0,0" Name="OpenMediaButton" VerticalAlignment="Top" Width="115" Grid.Row="2" Click="OpenMediaButton_Click" MinWidth="0" MinHeight="0" Padding="11,2,0,0" />
                    <s:SurfaceButton Content="CloseMedia" Height="30" HorizontalAlignment="Left" Margin="130,75,0,0" Name="CloseMediaButton" VerticalAlignment="Top" Width="115" Grid.Row="2" Click="CloseMediaButton_Click" MinWidth="0" MinHeight="0" Padding="11,2,0,0" />
                    <s:SurfaceButton Content="PanMedia" Height="30" HorizontalAlignment="Left" Margin="10,110,0,0" Name="PanMediaButton" VerticalAlignment="Top" Width="115" Grid.Row="2" Click="PanMediaButton_Click" MinWidth="0" MinHeight="0" Padding="11,2,0,0" />
                    <s:SurfaceButton Content="ZoomMedia" Height="30" HorizontalAlignment="Left" Margin="130,110,0,0" Name="ZoomMediaButton" VerticalAlignment="Top" Width="115" Grid.Row="2" Click="ZoomMediaButton_Click" MinWidth="0" MinHeight="0" Padding="11,2,0,0" />
                    <s:SurfaceButton Content="Tour (setup)" Height="30" HorizontalAlignment="Left" Margin="10,180,0,0" Name="TourSetupButton" VerticalAlignment="Top" Width="115" Grid.Row="2" Click="TourSetupButton_Click" MinWidth="0" MinHeight="0" Padding="11,2,0,0" /> -->

                </Canvas>

            </StackPanel>
        </DockPanel>


        <DockPanel Name="AuthLeftPanel" Opacity=".9" Canvas.Top="0" Canvas.Left="0" Height="864" Width="384" Background="#618276" Visibility="Hidden" Canvas.ZIndex="99">

            <s:SurfaceButton VerticalAlignment="Stretch" HorizontalAlignment="Right" Width="30" Background="#5a675f" DockPanel.Dock="Right" Click="LeftButtonAuthClick">
            </s:SurfaceButton>

            <StackPanel Name="authPanelContent" Background="#618276" DockPanel.Dock="Right">
                <!--<Canvas Name="AuthTools" 
                        Height="{Binding Height, ElementName=SectionBoxMaster}"
                        MinHeight="{Binding Height, ElementName=SectionBoxMaster}"
                        MaxHeight="{Binding Height, ElementName=SectionBoxMaster}"
                        Width="{Binding Width, ElementName=SectionBoxMaster}" 
                        Background="#618276">-->

                <Canvas Name="AuthTools" 
                        Height="{Binding Height}"
                        MinHeight="{Binding Height}"
                        MaxHeight="{Binding Height}"
                        Width="{Binding Width}" 
                        Background="#618276">

                    <Label Content="Tour Authoring Tools"
                           FontSize="{Binding FontSize, ElementName=SectionTitlesMaster}"
                           Name="authLabelTools" 
                           FontFamily="Segoe360" FontWeight="Bold"/>

                </Canvas>

            </StackPanel>
        </DockPanel>

        <s:ScatterView Name="MainScatterView" Height="1080" Width="1920" Canvas.ZIndex="100"></s:ScatterView>
        <s:SurfaceButton Name="switchToCatalogButton" Content="Catalog" Height="30" MinHeight="0" Padding="7 2 7 0" Canvas.Right="214"  Click="switchToCatalogButton_Click" Canvas.ZIndex="100"/>
        <!-- switch to artwork selection mode -->
        <!--s:SurfaceButton Name="activateKW" Content="Knowledge Web"  Height="30" MinHeight="0" Padding="7 2 7 0" Canvas.Right ="367" Canvas.ZIndex="100" Visibility="Collapsed" /-->
        <!-- switch to knowledge web mode -->
        <s:SurfaceButton Name="resetArtworkButton" Content="Reset Artwork" Height="30" MinHeight="0" Padding="7 2 7 0" Canvas.Right="78" Click="ResetArtworkButton_Click" Canvas.ZIndex="100"/>
        <s:SurfaceButton Name="tourAuthoringButton" Content="Tour Authoring" Height="30" MinHeight="0" Padding="7 2 7 0" Canvas.Right="300" Click="tourAuthoring_Click" Canvas.ZIndex="100"/>
        <s:SurfaceButton Name="metaData" Content="Assets list" Height="30" MinHeight="0" Padding="7 2 7 0" Canvas.Right="160" Visibility="Collapsed" Canvas.ZIndex="100"/>
        <s:SurfaceButton Name="drawPaths" Content="Add paths" Height="30" MinHeight="0" Padding="7 2 7 0" Canvas.Right="500" Visibility="Collapsed" Canvas.ZIndex="100"/>
        
        <s:SurfaceButton Name="tourAuthoringDoneButton" Content="Done" Opacity=".5" Height="30" MinHeight="0" Padding="7 2 7 0" Canvas.Right="10" Visibility="Collapsed" Canvas.ZIndex="100"/>
        <s:SurfaceButton Name="addAudioButton" Content="Add Audio" Height="30" MinHeight="0" Padding="7 2 7 0" Canvas.Right="260" Canvas.ZIndex="100"/>
        <s:SurfaceButton Name="tourAuthoringSaveButton" Content="Save" Opacity=".5" Height="30" MinHeight="0" Padding="7 2 7 0" Canvas.Right="80" Visibility="Collapsed" Canvas.ZIndex="100"/>
        <s:SurfaceButton Name="tourAuthoringDeleteButton" Content="Delete" Background="Red" Opacity=".5" Height="30" MinHeight="0" Padding="7 2 7 0" Canvas.Right="80" Visibility="Collapsed" Canvas.ZIndex="100"/>
        <s:SurfaceButton Name="exitButton" Content="QUIT" Background="Red" Opacity=".5" Width="48" Height="30" MinHeight="0" Padding="0 2 0 0" Canvas.Right="20" Click="ExitButton_Click" Canvas.ZIndex="100" HorizontalContentAlignment="Center"/>
        <s:SurfaceButton Name="quitButton" Content="QUIT" Background="Red" Opacity=".5" Width="48" Height="30" MinHeight="0" Padding="0 2 0 0" Canvas.Right="20" Click="ExitButton_Click" Canvas.ZIndex="100" Visibility="Collapsed"/>
        <Border Name="TimeBorder" BorderBrush="#214236" Visibility ="Collapsed" BorderThickness="4" CornerRadius="4" Canvas.Bottom="50" Canvas.Left="50" Width="300" Height="150" Canvas.ZIndex="100">
            <Canvas Visibility="Collapsed" Background="#ccd6c1" Name="TourLengthBox">
                <Label>Change Tour Length</Label>
                <s:SurfaceTextBox Height="30" Width="50" Name="TourLengthTextBox" Canvas.Left="40" Canvas.Top="50" FontSize="20">60</s:SurfaceTextBox>
                <Label Canvas.Top="50" Canvas.Left="90">Seconds</Label>
                <Label Name="shortTimeLabel" Canvas.Top="20" FontSize="14" Visibility="Hidden">Events will be lost - choose longer duration</Label>
                <s:SurfaceButton Canvas.Bottom="5" Canvas.Right="5" Name="applyTimeTourButton" Background="CadetBlue" Click="applyTimeTourButton_Click">
                    Apply
                </s:SurfaceButton>
                <s:SurfaceButton Canvas.Bottom="5" Canvas.Left="5" Name="cancelTimeTourButton" Background="CadetBlue" Click="cancelTimeTourButton_Click">
                    Cancel
                </s:SurfaceButton>
            </Canvas>
        </Border>
        <Border Name="RenameBorder" BorderBrush="#214236" Visibility ="Collapsed" BorderThickness="4" CornerRadius="4" Canvas.Bottom="200" Canvas.Left="200" Width="250" Height="150" Canvas.ZIndex="100">
            <Canvas Visibility="Collapsed" Background="#ccd6c1" Name="renameTimelineBox" >

                <Label>Type New Name</Label>
                <s:SurfaceTextBox Height="30" Width="200" Name="renameTimelineTextBox" Canvas.Left="20" Canvas.Top="50" FontSize="20">
                    new name here
                </s:SurfaceTextBox>


                <s:SurfaceButton Canvas.Bottom="5" Canvas.Right="5" Name="applyRenameTimelineButton" Background="CadetBlue">
                    Apply
                </s:SurfaceButton>
                <s:SurfaceButton Canvas.Bottom="5" Canvas.Left="5" Name="cancelRenameTimelineButton" Background="CadetBlue">
                    Cancel
                </s:SurfaceButton>

            </Canvas>
        </Border>
    </Canvas>

</s:SurfaceWindow>
